home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 138
/
Volume 138 Aug 19 2011 - Damaged.iso
/
Games
/
shore-siege.swf
/
scripts
/
DefineSprite_457
/
frame_1
/
PlaceObject2_410_321
/
CLIPACTIONRECORD onClipEvent(enterFrame).as
< prev
next >
Wrap
Text File
|
2011-08-19
|
671b
|
29 lines
onClipEvent(enterFrame){
if(_visible == true)
{
if(active == true)
{
_parent.mouseState = 4;
_parent.changeStateFlag = 0;
xOld = _X;
yOld = _Y;
_X = _X + (_root._xmouse - 20 - _X) / 1.2;
_Y = _Y + (_root._ymouse + 20 - _Y) / 1.2;
var angleTemp = _parent.angle(_X,_Y,xOld,yOld);
if(angleTemp < 90 && angleTemp > 0)
{
killActive = true;
}
else
{
killActive = false;
}
}
else
{
_X = _X + (xPos - _X) / 1.5;
_Y = _Y + (yPos - _Y) / 1.5;
}
}
}